home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Medal Software 2
/
Gold Medal Software Volume 2 (Gold Medal) (1994).iso
/
menuts
/
smmenu.arj
/
SAMPLE.MNU
< prev
next >
Wrap
Text File
|
1993-08-07
|
8KB
|
272 lines
; This is a sample main menu for SUPRMENU 5.1
;
; Once you have defined SMMENU.BAT, you can actually run this menu
; file by:
;
; > CD \subdir_containing_SUPRMENU
; > SMMENU SAMPLE.MNU
;
; This is the main menu. It will be executed by default when SUPRMENU
; is invoked from the SMMENU.BAT file.
;
; *Main is the menu label which is searched for.
; The next line is the title which will appear at the top of the
; menu window.
*Main
Sample Menu
;
; This menu item, when selected, will pop up the Exit to DOS dialog
; and cause an exit to DOS if the user selects YES.
;
; The line beginning with # defines the menu item. The character
; immediately after the # is the "hotkey" which, when pressed, will
; select this item (it will be highlighted).
; The string "Exit to DOS" (after the comma) will be displayed as the
; menu selection.
;
; The !EXIT command is what causes the Exit to DOS box and exits on YES.
;
#E,Exit to Dos
!EXIT
;
; This menu item invokes another menu below, whose label is *WP. When
; this menu item is selected, SUPRMENU will search from the beginning
; of this menu file for *WP, and will then display that menu.
;
#W,Word Processing
!MENU,wp
#T,Test SUPRMENU Tools
!MENU,tools
;
; This item simply calls the SMSETUP.EXE program to change the configuration
; of SUPRMENU
;
#C,Configure SUPRMENU
SMSETUP
;
; This item, when selected, issues a LOGOUT command by stuffing the
; keyboard buffer and exiting to DOS. DOS, upon detecting "typeahead"
; in the buffer (we put "LOGOUT"+CR in there), will execute the command
; as if you typed it.
;
#L,LOGOUT
!LOGOUT
;
; This item shows a way of handling the rebooting of the computer
;
; This assumes a subdirectory \CONFIGS which contains files to
; replace CONFIG.SYS and AUTOEXE.BAT, which are named
; <configname>.SYS (replaces CONFIG.SYS) and
; <configname>.BAT (replaces AUTOEXEC.BAT)
#R,Reboot the computer
; A choice dialog box
!CHOICE,1,COLD,WARM,Type of Reboot
!CHOICE,2,DOS,WINDOWS,None,Configuration to change to
; Skip over !EXEC commands if user chose None
!SKIPIF,2,None,2
; Immediately, right here, do the following commands.
!EXEC,IF EXIST \CONFIGS\%2.SYS copy \CONFIGS\%2.SYS C:\CONFIG.SYS
!EXEC,IF EXIST \CONFIGS\%2.BAT copy \CONFIGS\%2.SYS C:\AUTOEXEC.BAT
; Skip next line if user selected COLD
!SKIPIF,1,COLD
!REBOOT,W
!REBOOT,C
;
; List this menu file. Note: requires Vern Buerg LIST program.
;
#V,View SAMPLE.MNU
LIST SAMPLE.MNU
;
; Another menu definition. This is displayed when user selects the
; word processing item above.
;
*WP
Word Processing
;
; This menu item shows a sophisticated use of the SUBMENU and SKIP commands.
; The purpose is to issue the correct NOVELL CAPTURE command to direct
; print output to a network printer as selected.
;
; This is a demonstration of the trick described at the end of the
; SUPRMENU.DOC file, where %2 is embedded in the string placed into the
; #1 variable by the PRSELECT and NETPRSEL submenus. When the line %1
; is evaluated first %1 is replaced (including the %2 reference). Then
; the %2 reference is replaced(!).
;
; Note the use of the "numlines" parameter on !SKIPIF to skip 2 commands
; when the user selects a local printer; there is no need to ask the
; other two items.
;
; The generated commands are ECHOed, this is a demonstration. If you
; have Word Perfect, you could slightly modify the commands, remove
; the echos and call Word Perfect.
;
#W,Word Perfect
!SUBMENU,1,PRSELECT
!SKIPIF,1,ENDCAP,2
!SUBMENU,1,NETPRSEL
!SUBMENU,2,FFSEL
cls
echo %1
echo d:
echo cd \wp51
echo wp
echo ENDCAP
pause
;
; A demonstration of the !MSG command to display clarifying text.
;
; A demonstration of the !FILE command to get the name of a file to
; list. Note that no default is given, so ESC will terminate this
; command.
;
; Requires Vern Buerg's LIST program (or substitute a call to your own)
;
#L,List an ASCII file
!MSG,Select file to List
!FILE,1,*.*
LIST %1
;
; This menu is called from the main menu. It contains demonstration code
; for most of the SUPRMENU commands.
;
*TOOLS
SUPRMENU Tools
;
; The !ASK command gets free-form user input up to 48 characters.
;
; In this example, what the user types is placed into the #1 variable
; and then substituted for the %1 on the ECHO command.
;
; Note the use of the !SKIPIF command to test for a null value and
; abort this item if one is entered.
;
#A,ASK Command
!ASK,1,Enter something
!SKIPIF,1,,QUIT
cls
Echo You entered: %1
pause
;
; The !CHOICE command puts up a dialog box with selection buttons.
;
; The text of the selection button (in this case, YES, NO, or MAYBE)
; is placed into the variable (#1 in this case) when selected.
;
#C,CHOICE Command
!CHOICE,1,YES,NO,MAYBE,What is your choice?
cls
echo You said %1
pause
;
; The !SUBMENU command defines a popup menu. In this case, SUPRMENU
; displays the submenu defined below at *CHOICES. The return string
; from that submenu is placed in the # 1 variable.
;
#S,SUBMENU Command
!SUBMENU,1,Choices
cls
echo You chose: %1
pause
;
; !GETENV gets the value of a DOS environment variable and places it into
; a SUPRMENU replacement variable. Here, we get COMSPEC and USER values.
;
; The SKIPIF checks for a NULL value returned from USER, which means it
; is not defined.
;
#G,GETENV Command
!GETENV,1,COMSPEC
!GETENV,2,USER
cls
echo COMSPEC=%1
!SKIPIF,2,
echo USER=%2
!SKIPNOT,2,
Echo USER variable not defined
pause
;
; The !FILE command pops up a list of files and returns the fully-formatted
; path and filename selected.
;
; The first !FILE command will abort the processing of this item if ESC is
; pressed. The second !FILE command will return *.MNU is ESC is pressed.
;
; Note the use of !MSG boxes for clarification
;
#F,FILE Command
!MSG,Select A Source File
!FILE,1,*.*
!MSG,Select A Destination File
!FILE,2,*.*,*.MNU
cls
ECHO You have selected:
ECHO Source: %1 Destination: %2
pause
;
; ^PASS means the user must enter a password in order to use this menu item.
; Password entry is not case sensitive; It would accept PASS, pass, Pass,
; PaSs, etc.
;
#P,Password Protection (PASS)
^PASS
cls
ECHO You entered the magic word!!!!
pause
; Submenus for the above items
;
; The text to the left of the = sign is displayed. If an item is
; selected, the corresponding text to the right of the = is returned
; and placed in the SUPRMENU variable defined on the !SUBMENU command.
;
*PRSELECT
Select A Printer
Network Printer=NETWORK
Local Printer=ENDCAP
*NETPRSEL
Network Printer
Laser Printer=CAPTURE NB NTT %2 Q=PRINTQ_1
Dot Matrix Printer=CAPTURE NB NTT %2 Q=PRINTQ_0
*FFSEL
Send Form Feed
Form Feed=FF
No Form Feed=NFF
;
; Invoked by the !SUBMENU,1,Choices command above
;
*CHOICES
Choose One
Vanilla=Vanilla/Peppermint Ice Cream
Chocolate=Yecch! Chocolate
Strawberry=Yes, Berry Good!
Cherry=Cherry Red
Rasberry=Ooo! So bumpy!
Banana=In you ear!!
Peach=You are a peach!!
Tapioca=Lumpy tapioca
Blueberry=Oh, am I Blue!
Plum=Ouch! That was my thumb!